Optimal. Leaf size=29 \[ -\frac{b \log (\tan (x))}{a^2}-\frac{b \log (a+b \cot (x))}{a^2}+\frac{\tan (x)}{a} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.055597, antiderivative size = 29, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.154, Rules used = {3516, 44} \[ -\frac{b \log (\tan (x))}{a^2}-\frac{b \log (a+b \cot (x))}{a^2}+\frac{\tan (x)}{a} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3516
Rule 44
Rubi steps
\begin{align*} \int \frac{\sec ^2(x)}{a+b \cot (x)} \, dx &=-\left (b \operatorname{Subst}\left (\int \frac{1}{x^2 (a+x)} \, dx,x,b \cot (x)\right )\right )\\ &=-\left (b \operatorname{Subst}\left (\int \left (\frac{1}{a x^2}-\frac{1}{a^2 x}+\frac{1}{a^2 (a+x)}\right ) \, dx,x,b \cot (x)\right )\right )\\ &=-\frac{b \log (a+b \cot (x))}{a^2}-\frac{b \log (\tan (x))}{a^2}+\frac{\tan (x)}{a}\\ \end{align*}
Mathematica [A] time = 0.082131, size = 27, normalized size = 0.93 \[ \frac{-b \log (a \sin (x)+b \cos (x))+a \tan (x)+b \log (\cos (x))}{a^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.038, size = 21, normalized size = 0.7 \begin{align*}{\frac{\tan \left ( x \right ) }{a}}-{\frac{b\ln \left ( a\tan \left ( x \right ) +b \right ) }{{a}^{2}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.18012, size = 27, normalized size = 0.93 \begin{align*} -\frac{b \log \left (a \tan \left (x\right ) + b\right )}{a^{2}} + \frac{\tan \left (x\right )}{a} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.20457, size = 165, normalized size = 5.69 \begin{align*} -\frac{b \cos \left (x\right ) \log \left (2 \, a b \cos \left (x\right ) \sin \left (x\right ) -{\left (a^{2} - b^{2}\right )} \cos \left (x\right )^{2} + a^{2}\right ) - b \cos \left (x\right ) \log \left (\cos \left (x\right )^{2}\right ) - 2 \, a \sin \left (x\right )}{2 \, a^{2} \cos \left (x\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\sec ^{2}{\left (x \right )}}{a + b \cot{\left (x \right )}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.31513, size = 28, normalized size = 0.97 \begin{align*} -\frac{b \log \left ({\left | a \tan \left (x\right ) + b \right |}\right )}{a^{2}} + \frac{\tan \left (x\right )}{a} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]